package com.edge.ezota

import android.view.KeyEvent
import android.view.MotionEvent
import io.flutter.embedding.android.FlutterActivity

class MainActivity: FlutterActivity(){
    override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
             // 使用安全调用操作符处理 KeyEvent 对象
             event?.let {
                if (keyCode == KeyEvent.KEYCODE_BACK && event.repeatCount == 0){
                    return  false;
                }
            } ?: run {
              return false;
            }
       
        return super.onKeyDown(keyCode, event)
    }

}
